New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cify

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cify

一个面向对象辅助模块

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
61
increased by41.86%
Maintainers
1
Weekly downloads
 
Created
Source
var Class = require("cify").Class;

var Animal = new Class({
  constructor: function(name) {
    this.name = name;
  },
  getName: function() {
    return "Animal:" + this.name;
  }
});

var Cat = new Class({
  _extends: Animal,
  getName: function() {
    return "Cat:" + this.name;
  }
});

var animal = new Animal("Obama");
console.log(animal.getName()); //Animal:Obama

var cat = new Cat("Obama");
console.log(cat.getName()); //Cat:Obama


var MyDate = new Class(function() {
  var formatDate = function(date, format_str) {
    ...
  };
  return {
    _extends: Date,
    toFormat: function(format_str) {
      return formatDate(this, format_str);
    }
  };
});

var date = new MyDate("2046-01-01");
console.log(date.getFullYear()); //2046
console.log(date.toFormat("yyyy年MM月dd日")); //2046年01月01日

Keywords

FAQs

Package last updated on 10 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc